import request from '@/utils/request'

// 查询定时消息提醒列表
export function listSysRemindEvent(query) {
  return request({
    url: '/sys/sysRemindEvent/list',
    method: 'get',
    params: query
  })
}

// 查询定时消息提醒详细
export function getSysRemindEvent(id) {
  return request({
    url: '/sys/sysRemindEvent/' + id,
    method: 'get'
  })
}

// 查询定时消息提醒详细
export function getByDataIdAndType(dataId, type) {
  return request({
    url: '/sys/sysRemindEvent/getByDataIdAndType/' + dataId + '/' + type,
    method: 'get'
  })
}

// 保存定时消息提醒
export function saveSysRemindEvent(data) {
  return request({
    url: '/sys/sysRemindEvent/save',
    method: 'post',
    data: data
  })
}

// 保存定时消息提醒, 并创建任务
export function saveDataSysRemindEvent(data) {
  return request({
    url: '/sys/sysRemindEvent/saveData',
    method: 'post',
    data: data
  })
}

// 删除定时消息提醒
export function delSysRemindEvent(id) {
  return request({
    url: '/sys/sysRemindEvent/' + id,
    method: 'delete'
  })
}

// 导出定时消息提醒
export function exportSysRemindEvent(query) {
  return request({
    url: '/sys/sysRemindEvent/export',
    method: 'get',
    params: query
  })
}
